
package bsc.war.test;

import bsc.ejb.entity.Person;
import bsc.war.delegate.DelegateBSC;
import bsc.war.factory.Factory;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

/**
 *
 * @author castrosalazr
 */
public class DesignerTestListUsers extends AbstractController  {

     @Override
    protected ModelAndView handleRequestInternal(HttpServletRequest request,
         HttpServletResponse response) throws Exception {

        try {
            DelegateBSC delegate = (DelegateBSC) Factory.getBean("DelegateBSC");
            List<Person> persons = delegate.findPerson();

            request.setAttribute("persons", persons);
        } catch (Exception e) {
        }

         return new ModelAndView("designerTestListUsers");
    }
}
